class Area < ActiveRecord::Base
  acts_as_nested_set
  
  has_many :schools, :dependent => :destroy
  
  validates_presence_of :title
  
  cattr_reader :disasters
  @@disasters = {"汶川" => 2330,
                 "都江堰" => 2186,
                 "旌阳" => 2219,
                 "梁平" => 2175,
                 "北川" => 2234,
                 "彭州" => 2187,
                 "绵竹" => 2222,
                 "什邡" => 2221,
                 "理县" => 2331,
                 "茂县" => 2332,
                 "江油" => 2228,
                 "青川" => 2240,
                 "安县" => 2231,
                 "平武" => 2233,
                 "甘肃文县" => 2894,
                 "甘肃甘南" => 2910}
end
